package com.zzwc;

import com.zzwc.vote.config.EnvironmentConfig;
import com.zzwc.vote.listen.ApplicationReadyEventListener;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer {

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {

		System.out.println("***************************************************************");
		System.out.println("启动 zzwc-vote...");

		application.sources(Application.class)
				.profiles(EnvironmentConfig.getActiveProfile())
				.listeners(new ApplicationReadyEventListener());

		return application;
	}

}
